<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
   xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui" xmlns:pb="http://b2b.pb.com/tags">

<ui:composition template="/template/MainTemplate.xhtml">
   <ui:define name="body">
      <pb:saveBean beanName="createProductBean" bean="#{createProductBean}" />

      <p>
         <h:outputText value="#{productBundle.create_category_start_msg}" />
      </p>

      <!-- p:panel header="#{productBundle.create_category_tbl_header}">
         <p:treeTable value="#{createProductBean.root}" var="categoryLanguage"
            selection="#{createProductBean.selectedNodes}" selectionMode="multiple">

            <p:column style="width:150px" headerText="#{productBundle.lbl_category_name}">
               <h:outputText value="#{categoryLanguage.name}" />
            </p:column>

            <p:column style="width:150px" headerText="#{productBundle.lbl_description}">
               <h:outputText value="#{categoryLanguage.description}" />
            </p:column>

            <p:column style="width:150px" headerText="#{productBundle.lbl_row}">
               <h:outputText value="#{categoryLanguage.category.rowNumber}" />
            </p:column>

            <p:column style="width:150px" headerText="#{productBundle.lbl_status}">
               <h:outputText value="#{categoryLanguage.category.status}" />
            </p:column> 

         </p:treeTable>
      </p:panel-->

      <p:panel header="#{productBundle.create_product_tbl_header}" styleClass="marginTop7">
         <p:panelGrid styleClass="zebra">
            <p:row>
               <p:column styleClass="confirmCol1">
                  <h:outputText value="#{productBundle.lbl_mark}" />
               </p:column>
               <p:column styleClass="confirmCol2">
                  <p:selectOneMenu value="#{createProductBean.selectedMark}">
                     <f:selectItem itemLabel="Select One" itemValue="" />
                     <f:selectItems value="#{createProductBean.marks}" />
                  </p:selectOneMenu>
               </p:column>
            </p:row>
            <p:row>
               <p:column styleClass="confirmCol1">
                  <h:outputText value="#{productBundle.lbl_categories}" />
               </p:column>
               <p:column styleClass="confirmCol2">
                  <p:tree value="#{createProductBean.root}" var="categoryLanguage" style="border:1px solid #a7becf;" 
                     selection="#{createProductBean.selectedNodes}" selectionMode="multiple">

                     <p:treeNode>
                        <h:outputText value="#{categoryLanguage.name}" />
                     </p:treeNode>

                  </p:tree>
               </p:column>
            </p:row>
            <p:row>
               <p:column styleClass="confirmCol1">
                  <h:outputText value="#{productBundle.lbl_price}" />
               </p:column>
               <p:column styleClass="confirmCol2">
                  <p:inputText value="#{createProductBean.newProduct.price}" />
               </p:column>
            </p:row>
            <p:row>
               <p:column styleClass="confirmCol1">
                  <h:outputText value="#{productBundle.lbl_tax}" />
               </p:column>
               <p:column styleClass="confirmCol2">
                  <p:inputText value="#{createProductBean.newProduct.tax}" />
               </p:column>
            </p:row>
            <p:row>
               <p:column colspan="2" style="padding: 0 0 5px 0;">
                  <p:tabView id="tabView" var="productLanguage" value="#{createProductBean.newProductLanguages}"
                     style="padding:0;">
                     <p:tab id="languageTab" title="#{productLanguage.language.name}">

                        <p:panelGrid columns="2" styleClass="tabPanel zebra" columnClasses="confirmCol1,confirmCol2">
                           <h:outputText value="#{productBundle.lbl_product_name}" />
                           <p:inputText id="name" value="#{productLanguage.name}" maxlength="30" />

                           <h:outputText value="#{productBundle.lbl_product_code}" />
                           <p:inputText id="code" value="#{productLanguage.code}" maxlength="30" />

                           <h:outputText value="#{productBundle.lbl_keywords}" />
                           <p:inputTextarea id="keywords" value="#{productLanguage.keywords}" maxlength="45" />

                           <h:outputText value="#{productBundle.lbl_description}" />
                           <p:inputTextarea id="description" value="#{productLanguage.description}" maxlength="45" />

                        </p:panelGrid>

                     </p:tab>
                  </p:tabView>
               </p:column>
            </p:row>
         </p:panelGrid>
      </p:panel>

      <div class="marginTop15 btnRight">
         <p:commandButton value="#{appbundle.btn_continue}" action="#{createProductBean.confirmAction}" ajax="false" />
      </div>

   </ui:define>
</ui:composition>
</html>